
package com.teamwings.enums;

/**
 * 日期： 2010-7-29
 * 作者： 黄京亮
 * 描述： 共用的常量与变量
 * 参数： 
 */

public class ConstData {
    public static final String HTTPCPDE = "202";
    public static final String HTTPERRORCODE ="500";
    //是否输出到控制台
    public static final boolean SYSTEM_OUT = true;

    /**================下面是可配置的系统变量================*/
    //附件服务器IP
    public static String CONFIG_FILESERVERIP="127.0.0.1";
    //附件根目录
    public static String CONFIG_FILEROOT="D:\\AffixRoot";
    //限制文件大小(M)
    public static int CONFIG_FILESIZE=30;
    //附件保存形式
    public static int CONFIG_FILESAVETYPE=1;
    //最大传输字节数
    public static int CONFIG_MAXBYTESIZE=1024*20;
    //数据库类型
    public static String CONFIG_DBTYPE="";

    /**================下面是系统配置表名称常量================*/
    //附件服务器IP
    public static final String CONFIG_NAME_FILESERVERIP="$FILESERVERIP";
    //页面根目录
    public static final String CONFIG_NAME_PAGEROOT="$PAGEROOT";
    //附件根目录
    public static final String CONFIG_NAME_FILEROOT="$FILEROOT";
    //限制文件大小
    public static final String CONFIG_NAME_FILESIZE="$FILESIZE";
    //附件保存形式
    public static final String CONFIG_NAME_FILESAVETYPE="$FILESAVETYPE";
    //最大传输字节数
    public static final String CONFIG_NAME_MAXBYTESIZE="$MAXBYTESIZE";

    /**================下面是正文附件目录常量================*/
    //正文文件夹名称
    public static final String CONFIG_FILEPATH_ZW="ZWZIP";
    //附件文件夹名称
    public static final String CONFIG_FILEPATH_FJ="FJZIP";
    //应用附件文件夹名称
    public static final String CONFIG_FILEPATH_APP="APPZIP";

    /**================下面是正文附件类型常量================*/
    //正文类型
    public static final int CONFIG_FILETYPE_ZW=1;
    //附件类型
    public static final int CONFIG_FILETYPE_FJ=2;
    //应用附件类型
    public static final int CONFIG_FILETYPE_APP=3;
    //回复稿正文类型
    public static final int CONFIG_FILETYPE_REPLYZW=4;
    //回复稿附件类型
    public static final int CONFIG_FILETYPE_REPLYFJ=5;

    /**================下面是命令常量================*/
    //标记开始符
    public static final String MY_BEGINCHAR="#MY-BEGINCHAR:";
    //标记结束符
    public static final String MY_ENDCHAR=":MY-ENDCHAR#";
    //逗号分隔符
    public static final String MY_SEPARATOR_DOUHAO=MY_BEGINCHAR+","+MY_ENDCHAR;
    //分号分隔符
    public static final String MY_SEPARATOR_FENHAO=MY_BEGINCHAR+";"+MY_ENDCHAR;
    /***换行符*/
    public static final String SEPARATOR_LINE = System.getProperty("line.separator");

    /**================下面是文件状态常量================*/
    //未激活
    public static final int RECORD_STATE_NOTINIT=0;
    //正常
    public static final int RECORD_STATE_NORMAL=1;
    //锁定、暂停、挂起
    public static final int RECORD_STATE_SUSPEND=2;
    //删除
    public static final int RECORD_STATE_DELETE=3;
    //已发往外单位
    public static final int RECORD_STATE_SENDOUT=5;
    //已办结
    public static final int RECORD_STATE_END=6;
    //已归档
    public static final int RECORD_STATE_ARCH=7;

    /**================下面是查询语句常量================*/
    //默认每页记录数
    public static final int DEFAULTPAGESIZE=20;
    //默认每页最大记录数
    public static final int DEFAULTMAXPAGESIZE=1000;

    /**================下面是环节类型常量================*/
    //开始环节
    public static final int WFNODETYPE_START=0;
    //结束环节
    public static final int WFNODETYPE_STOP=10;
    //办理环节
    public static final int WFNODETYPE_BANLI=1;
    //传阅环节
    public static final int WFNODETYPE_CHUANYUE=2;
    //子流环节
    public static final int WFNODETYPE_SUBFLOW=3;
    //抄送环节
    public static final int WFNODETYPE_COPYSEND=4;
    //WebService接口环节
    public static final int WFNODETYPE_WEBSERVICE=5;
    //COM接口环节
    public static final int WFNODETYPE_COM=6;
    //Http接口环节
    public static final int WFNODETYPE_HTTP=7;
    //自动处理环节
    public static final int WFNODETYPE_AUTO=8;
    //自定义环节
    public static final int WFNODETYPE_CUSTOM=9;
    //传阅完毕（虚拟）
    public static final int WFNODETYPE_CHUANYUE_END=-2;
    //并流框
    public static final int WFNODETYPE_BINGLIU_BLOCK=11;
    //条件流
    public static final int WFNODETYPE_CONDITION=12;

    /**================下面是受理对象常量================*/
    //个人受理
    public static final int WFOBJECTTYPE_PERSON=1;
    //部门受理
    public static final int WFOBJECTTYPE_DEPT=2;

    /**================下面是受理限制常量================*/
    //单对象
    public static final int WFOBJECTCOUNT_SINGLE=1;
    //多对象
    public static final int WFOBJECTCOUNT_MULTI=2;

    /**================下面是受理顺序常量================*/
    //串行处理
    public static final int WFOBJECTSORT_SERIES=1;
    //并行处理
    public static final int WFOBJECTSORT_PARALLEL=2;
    //独立并行处理（并行的一种，但不需要等待全部人都发送后再发往下一环节，直接可以发往下一环节）
    public static final int WFOBJECTSORT_DULIPARALLEL=3;

    /**================下面是后续流转类型常量================*/
    //人工选择
    public static final int WFNEXTROUTETYPE_SELECT=1;
    //条件选择
    public static final int WFNEXTROUTETYPE_CONDITION=2;
    //自由发送
    public static final int WFNEXTROUTETYPE_FREESEND=31;
    //自由接收
    public static final int WFNEXTROUTETYPE_FREERECEIVE=32;
    //完全自由流转
    public static final int WFNEXTROUTETYPE_FREE=33;

    /**================下面是环节流转状态常量================*/
    //活动实例已被创建，但还未活动
    public static final int WFWORKITEMSTATUS_INIT = 0;
    //工作项已经被创建但未签收
    public static final int WFWORKITEMSTATUS_NOSIGN = 1;
    //取消
    public static final int WFWORKITEMSTATUS_CANCEL = 2;
    //已签收
    public static final int WFWORKITEMSTATUS_SIGNIN = 3;
    //退件处理状态
    public static final int WFWORKITEMSTATUS_BACK = 4;
    public static final int WFWORKITEMSTATUS_DISPATCH = 4;
    //已发送
    public static final int WFWORKITEMSTATUS_SENDOUT = 5;
    //已完成
    public static final int WFWORKITEMSTATUS_COMPLETE = 6;
    //取回
    public static final int WFWORKITEMSTATUS_GETBACK = 71;
    //被取回
    public static final int WFWORKITEMSTATUS_GETBACK2 = 72;
    //退回
    public static final int WFWORKITEMSTATUS_SENDBACK = 81;
    //被退回
    public static final int WFWORKITEMSTATUS_SENDBACK2 = 82;
    //归档
    public static final int WFWORKITEMSTATUS_ARCH = 9;
    //锁定、暂停、挂起
    public static final int WFWORKITEMSTATUS_HANGUP = 10;

    /**================下面是自动触发时间点常量（脚本触发、消息提醒触发）================*/
    //开始前、文件到达前
    public static final int WFTRIGERTIME_BEFORECREATE = 0;
    //开始后、文件到达后
    public static final int WFTRIGERTIME_AFTERCREATE = 1;
    //签收前
    public static final int WFTRIGERTIME_BEFORESIGN = 2;
    //签收后
    public static final int WFTRIGERTIME_AFTERSIGN = 3;
    //结束前、发送前
    public static final int WFTRIGERTIME_BEFORESEND = 4;
    //结束后、发送后
    public static final int WFTRIGERTIME_AFTERSEND = 5;
    //取回前
    public static final int WFTRIGERTIME_BEFOREGETBACK = 6;
    //取回后
    public static final int WFTRIGERTIME_AFTERGETBACK = 7;
    //退回前
    public static final int WFTRIGERTIME_BEFORESENDBACK = 8;
    //退回后
    public static final int WFTRIGERTIME_AFTERSENDBACK = 9;
    //超时后、过期后
    public static final int WFTRIGERTIME_TIMEOUT = 10;


    /**================下面是消息提醒类型常量================*/
    //内部消息
    public static final int WFALERTTYPE_MSG = 0;
    //函
    public static final int WFALERTTYPE_HAN = 1;
    //短信
    public static final int WFALERTTYPE_SMS = 2;
    //EMAIL
    public static final int WFALERTTYPE_EMAIL = 3;


    /**================下面是消息提醒用户常量================*/
    //当前用户
    public static final int WFALERTUSER_CURUSER = 0;
    //创建人
    public static final int WFALERTUSER_CREATOR = 1;
    //发件人
    public static final int WFALERTUSER_SENDER = 2;
    //督办人
    public static final int WFALERTUSER_DUBANREN = 3;

    /**================下面是后续处理人常量================*/
    //不指定
    public static final int WFNEXTROUTEUSER_NONE = -1;
    //手动指定
    public static final int WFNEXTROUTEUSER_SELECT = 0;
    //直送经办人
    public static final int WFNEXTROUTEUSER_TODOUSER = 1;
    //直送创建人
    public static final int WFNEXTROUTEUSER_TOCREATOR = 2;
    //直送自己
    public static final int WFNEXTROUTEUSER_TOMYSELF = 3;
    //直送本部门其它人
    public static final int WFNEXTROUTEUSER_TOOTHEROFDEPT = 4;
    //直送后续环节全部权限人
    public static final int WFNEXTROUTEUSER_TOALLROLEUSER = 5;
    //直送发件人
    public static final int WFNEXTROUTEUSER_TOSENDER = 6;

    /**==============下面是高级授权类型常量======================*/
    public static final int MANAGERTYPE_ADMINISTRATOR=1;//高级管理员
    public static final int MANAGERTYPE_UNITANDDEPTMANAGER=2;//单位与部门管理员
    public static final int MANAGERTYPE_ALLFILESEARCHER=3;//全部文件查询人
    public static final int MANAGERTYPE_UNITANDDEPTFILESEARCHER=4;//单位与部门文件查询人

    /**==============下面是消息提示常量======================*/
    //消息类型
    public static final int SYSMESSAGE_MSGTYPE_TIP=0;//提示消息
    public static final int SYSMESSAGE_MSGTYPE_ERR=1;//错误消息
    //按钮类型
    public static final int SYSMESSAGE_BUTTONTYPE_NOTCLOSE=0;//没有关闭按钮
    public static final int SYSMESSAGE_BUTTONTYPE_CLOSE=1;//关闭按钮
    public static final int SYSMESSAGE_BUTTONTYPE_CLOSEANDBACK=2;//关闭、返回按钮


    /**==============下面是日志常量======================*/
    public static String LOG_DEFAULT_PATH = "$DEFAULT_PATH";

    public static final int LOG_LEVEL_ERROR = 0;	//错误日志
    public static final int LOG_LEVEL_INFO = 1;	//操作日志（默认）
    public static final int LOG_LEVEL_DEBUG = 2;	//调试日志
    public static final int LOG_LEVEL_OFF = 99;	//关闭日志

    public static String LOG_ACTION_LOGIN = "登录";
    public static String LOG_ACTION_LOGOUT = "登出";
    public static String LOG_ACTION_ADD = "增加记录";
    public static String LOG_ACTION_UPDATE = "修改记录";
    public static String LOG_ACTION_DELETE = "删除记录";

    public static String LOG_ACTION_ADDFILE = "增加文件";
    public static String LOG_ACTION_UPDATEFILE = "修改文件";
    public static String LOG_ACTION_DELETEFILE = "删除文件";

    public static String LOG_ACTION_START = "启动流程";
    public static String LOG_ACTION_CANCELREGIST = "销毁流程";
    public static String LOG_ACTION_SEND = "发送";
    public static String LOG_ACTION_SIGNIN = "签收";
    public static String LOG_ACTION_GETBACK = "取回";
    public static String LOG_ACTION_SENDBACK = "退回";
    public static String LOG_ACTION_HANGUP = "暂存";
    public static String LOG_ACTION_CANCELHANGUP = "激活";
    public static String LOG_ACTION_COMMENT = "填写意见";
    public static String LOG_ACTION_END = "办结";
    public static String LOG_ACTION_ENDGETBACK = "办结取回";
    public static String LOG_ACTION_CHUANYUEGETBACK = "传阅取回";

    public final static String LOG_MODULE_WORK_FLOW = "工作流";

    /**tany 20140526==============邮件=====================*/
    //类型1   发送
    public static final int TYPE_SEND=1;
    //接收2
    public static final int TYPE_RECEIVE=2;
    //保存0
    public  static final int TYPE_SAVED=3;
    //删除
    public  static final int TYPE_DELETED=4;


    //是否删除  0删除
    public static final int DELETE_DELETE=0;
    //1未删除
    public static final int DELETE_NOTDELETE=1;

    /**tany 20140618  日程 是否发送*/
    //是都否发送  未发送
    public static final int SEND_NO=0;
    //1已发送
    public static final int SEND_YES=1;


    /**外单位办文跟踪 临时数据源的 单位ID Cookie的名称*/
    public static final String TEMP_DBSOURCE_UNIT_ID_COOKIES_NAME="Temp_Db_Source_UnitID";

    /**==============下面是公共库常量======================*/
    public static final int UNITID_COMMON=-1;//公用库所使用的单位ID
    public static final String UNITNAME_COMMON="公共表单";//公用库所使用的单位名称

    /*================下面是短信相关常量================*/
    /**短信内容最大长度*/
    public static final int SMS_CONTENT_MAX_LENGTH = 400;
    /**发送短信一次手机号最多1000个*/
    public static final int SMS_MAX_SEND_MOBILES_COUNT = 1000;
    /**短信发送成功结果编码*/
    public static final String SMS_SEND_RESULT_CODE_SUCCESS = "0";

    /*================下面是用友NC(erp)、HR系统接口相关常量================*/
    /**第三方系统用户映射类型 - 用友NC(erp)系统*/
    public static final String USER_THIRD_MAPPING_TYPE_NC = "NC-ERP";
    /**第三方系统用户映射类型 - 用友人力自助系统*/
    public static final String USER_THIRD_MAPPING_TYPE_HR = "HR";
    /**第三方系统用户映射类型 - 用友风险防控系统*/
    public static final String USER_THIRD_MAPPING_TYPE_RISKINPORT = "RiskInport";

    /*===============下面是OA通知类型常量===============*/
    public static final int OA_NOTICETYPE_DOC=1;//公文通知类型
    public static final int OA_NOTGWTYPE_DOC=2;//不是公文通知类型

    /*===============下面是会议通知类型常量===============*/
    public static final String MEETING_NOTICETYPE_AGENDA="日程通知";
    public static final String MEETING_NOTICETYPE_SMS="短信通知";
    public static final String MEETING_NOTICETYPE_EMAIL="邮件通知";

    /*===============下面是内部交换常量==================*/
    //交换返馈状态
    public static final int INNEREXCHANGE_FEEDBACK_STATE_WAIT=0;//待返馈
    public static final int INNEREXCHANGE_FEEDBACK_STATE_END=1;//已返馈

    //交换状态常量
    public static final int INNEREXCHANGE_STATE_NOSIGN=0;//未签
    public static final int INNEREXCHANGE_STATE_SIGNED=1;//已签收
    public static final int INNEREXCHANGE_STATE_DEL=3;//删除

    //交换数据类型
    public static final int INNEREXCHANGE_TYPE_TABLEDATA=0;//表数据
    public static final int INNEREXCHANGE_TYPE_SYSVAR=1;//系统变量
    public static final int INNEREXCHANGE_TYPE_DOCID=2;//办文编号
    public static final int INNEREXCHANGE_TYPE_DMAFFIX=3;//正文附件信息
    public static final int INNEREXCHANGE_TYPE_COMMENT=4;//办文意见
    public static final int INNEREXCHANGE_TYPE_CONST=5;//常量值
}
